import config from "@/config"
import http from "@/utils/request"

export default {
  postFestivalData: {
    url: `${config.API_URL}/cms/festival/admin/festival/save`,
    name: "提交活动数据",
    post: async function(data){
      return await http.post(this.url, data)
    }
  },
  getList: {
    url: `${config.API_URL}/cms/festival/admin/list`,
    name: "获取列表信息",
    get: async function(params){
      return await http.get(this.url, params)
    }
  },
  activityDetail: {
    url: `${config.API_URL}/cms/festival/admin/info/`,
    name: "获取活动详情",
    get: async function(params){
      return await http.get(this.url+params)
    }
  },
  exportActivityUrl: {
    url: `${config.API_URL}/cms/festival/export/url/`,
    name: "导出链接",
    get: async function(params){
      return await http.get(this.url+params)
    }
  },
  createQRCode: {
    url: `${config.API_URL}/cms/festival/generateCodes`,
    name: "生成code",
    post: async function(data){
      return await http.post(this.url, data)
    }
  },
  availableActivity: {
    url: `${config.API_URL}/cms/festival/upload/`,
    name: "生成code",
    get: async function(params){
      return await http.get(this.url + params)
    }
  }
  
}